﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CalculatorLib;
using CalculatorLib.Model;

namespace CalculatorMain
{
    class Program
    {
        static void Main(string[] args)
        {

            Calculator calculator = new Calculator();
            CalModel data1 = new CalModel();
            CalModel data2 = new CalModel(CalOperation.Div);

            data1.IntegerValue1 = 20;
            data1.IntegerValue2 = 14;
            data1.ListOfIntegerValue = new List<int>() {10, 5, 2, 4, 1};
            data1.CalMode = CalMode.List;
            data1.Operation = CalOperation.Add;

            calculator.Data = data1;

            try
            {
                int result = calculator.Calculate();
                Console.WriteLine("Result: " + result);
            }
            catch (Exception ex)
            {
                Console.WriteLine("Errors: " + ex.Message);
            }
            Console.Read();

        }
    }
}
